package com.lzhsite.technology.designPattern.command.ComputerDemo;
/**
 * 系统需要将一组操作组合在一起，即支持宏命令。
 * @author lzhcode
 *
 */
public class ClientForComputerDemo
{
    public static void main(String[] args)
    {
        IMainBoard mainBoard = new GigaByteMainBoard();
        OpenCommand openCommand = new OpenCommand(mainBoard);
        ResetCommand resetCommand = new ResetCommand(mainBoard);
        Box box = new Box();
        box.setOpenCommand(openCommand);
        box.setResetCommand(resetCommand);
        System.out.println("----- 开机 ------");
        box.openButtonPressed();
        System.out.println();
        System.out.println("----- 重启 ------");
        box.resetButtonPressed();
    }
}
